﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Runtime.Serialization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Newtonsoft.Json;
using VkontakteInfrastructure.Interfaces;
using Video = VkontakteInfrastructure.Model.Video;

namespace VkontakteServiceLayer.Responses
{
	public class Video
	{
		[JsonProperty("id"), DataMember(Name = "id")]
		public string Id { get; set; }

		[JsonProperty("title"), DataMember(Name = "title")]
		public string Title { get; set; }

		[JsonProperty("description"), DataMember(Name = "description")]
		public string Description { get; set; }

		[JsonProperty("owner_id"), DataMember(Name = "owner_id")]
		public string OwnerId { get; set; }

		[JsonProperty("duration"), DataMember(Name = "duration")]
		public string Duration { get; set; }

		[JsonProperty("date"), DataMember(Name = "date")]
		public string Date { get; set; }

		[JsonProperty("thumb"), DataMember(Name = "thumb")]
		public string SmallImage { get; set; }

		[JsonProperty("image_medium"), DataMember(Name = "image_medium")]
		public string MediumImage { get; set; }

		[JsonProperty("player"), DataMember(Name = "player")]
		public string PlayerUrl { get; set; }
	}


	[DataContract]
	public class GetVideos : IServiceResult
	{
		[DataMember(Name = "response")]
		public Video[] Video { get; set; }

		public int Count { get { return Video.Length; } }
		public bool ResponseIsSuccess()
		{
			return Video != null;
		}
	}
}
